#include <stdio.h>
#include <string.h>
int  UpperCase(char str[]);
int main()
{  	 		      
    char  str[20];
    int count;
    printf("Input a word:\n");
    gets(str);//1
    count = UpperCase(str);//1
    printf("%s\n", str);
    printf("%d\n", count);
    return 0;
}  	 		      
int  UpperCase(char str[])
{  	 		      
    int i, count = 0;//1
    for (i=0; str[i]!='\0'; i++)//1
    {  	 		      
        if (str[i]>='a' && str[i]<='z')//1
        {  	 		      
            str[i] = str[i] - ('a' - 'A');//1
            count++;//1
        }
    }
    return count;//1
}  	 	